package com.gable.exhibition.dao;

import com.gable.exhibition.model.Repair;
import com.gable.exhibition.view.ParameterView;
import com.gable.exhibition.view.RepairView;
import com.gable.exhibition.view.SmsView;

import java.util.List;
import java.util.Map;

public interface RepairDao {
    int deleteByPrimaryKey(Long repairId);

    int insertSelective(Repair record);

    Repair selectByPrimaryKey(Long repairId);

    int updateByPrimaryKeySelective(Repair record);

    /**
     * 获取维修总数 用户分页
     * @param repairView
     * @return
     */
    int count(RepairView repairView);

    /**
     * 获取维修列表  分页
     * @param repairView
     * @return
     */
    List<RepairView> list(RepairView repairView);

    /**
     * 修改数据
     * @param repair
     * @return
     */
    int update(Repair repair);

    /**
     * 查询维修详情
     * @param repairView
     * @return
     */
    RepairView details(RepairView repairView);

    /**
     * 查询维修短信需要的信息
     * @param repairId
     * @return
     */
    SmsView repairForSms(Long repairId);

    int updateByDistribution(RepairView repairView);

    int queryRemindCount(ParameterView parameterView);
    List<RepairView> queryRemind(Map map);

    List<ParameterView> getMaintainerByHospitalId(ParameterView parameter);

    int queryDeviceIsRepair(Long deviceId);

    RepairView queryRepairInfo(RepairView repairView);

    /**
     * 更新serviceType
     * @param repairView
     * @return
     */
    int updateServiceType(RepairView repairView);

    int updateRepairSetNull(Repair repair);
}